<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>表格的删除</title>
		<script src="http://libs.baidu.com/jquery/2.1.4/jquery.min.js"></script>
		<script type="text/javascript">
			$(function() {

				$("input[type='button']").click(function() {
					//alert("sf");
					$("input[name='test']:checked").each(function() { // 遍历选中的checkbox
						n = $(this).parents("tr").index(); // 获取checkbox所在行的顺序
						$("table#test_table").find("tr:eq(" + n + ")").remove();
					});
				});
			});
		</script>

	</head>
	<body>
		<table id="test_table" border="1px">
			<tr>
				<td><input type="checkbox" name="test"></td>
				<td>1</td>
				<td>2</td>
				<td>3</td>
			</tr>
			<tr>
				<td><input type="checkbox" name="test"></td>
				<td>4</td>
				<td>5</td>
				<td>6</td>
			</tr>
			<tr>
				<td><input type="checkbox" name="test"></td>
				<td>7</td>
				<td>8</td>
				<td>9</td>
			</tr>
			<tr>
				<td><input type="checkbox" name="test"></td>
				<td>10</td>
				<td>11</td>
				<td>12</td>
			</tr>
		</table>
		<input type="button" value="删除">

	</body>
